package com.example.noval.network.api

import com.example.noval.db.mode.ContentResp
import com.example.noval.db.mode.Pagination
import com.example.noval.db.mode.SearchResp
import com.example.noval.db.mode.TocResp
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * @Description
 * @Author zzl
 * @Date 2024/3/25
 */
interface BookService {

    @POST("fiction/search/search")
    suspend fun searchBook(
       @Body body:RequestBody
    ):ApiResult<List<SearchResp>> 

    @GET("book/chapter_list/100/{bookId}")
    suspend fun searchToc(@Path("bookId") bookId:String):List<TocResp>

    @GET("book/chapter/segment/master/{bookId}_{tocId}.txt")
    suspend fun searchContent(
        @Path("bookId") bookId:String,
        @Path("tocId") tocId:String,
        @Query("md5") md5:String):List<ContentResp>
    
}